package com.yycx.module.bus.provider.service.impl;

import com.yycx.common.base.entity.EntityMap;
import com.yycx.common.mybatis.model.ResultBody;
import com.yycx.common.mybatis.query.CriteriaQuery;
import com.yycx.common.mybatis.query.CriteriaSave;
import com.yycx.common.base.utils.FlymeUtils;
import com.yycx.module.bus.client.entity.BusPaymenttype;
import com.yycx.module.bus.provider.mapper.BusPaymenttypeMapper;
import com.yycx.module.bus.provider.service.BusPaymenttypeService;
import com.yycx.common.mybatis.base.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * 资金支付类型接口实现类
 *
 * @author flyme
 * @date 2020-12-07
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class BusPaymenttypeServiceImpl extends BaseServiceImpl<BusPaymenttypeMapper, BusPaymenttype> implements BusPaymenttypeService {

    @Override
    public ResultBody beforeAdd(CriteriaSave cs, BusPaymenttype paymenttype, EntityMap extra) {
        return ResultBody.ok();
    }



    @Override
    @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
    public ResultBody beforePageList(CriteriaQuery<BusPaymenttype> cq, BusPaymenttype paymenttype, EntityMap requestMap) {
      cq.orderByDesc("paymenttype.createTime");
      return ResultBody.ok();
    }
}
